/***********************************************************
 
 File name: AANavigationVC.h
 Author:    xuwei
 Description:
 导航栏基类
 
 2018/02/27: Created
 
 ************************************************************/

#import "AANavigationVC.h"

@interface AANavigationVC ()

@end

@implementation AANavigationVC
#pragma mark - Life Circle 生命周期
- (void)viewDidLoad {
    [super viewDidLoad];
    [self setNavigationWithTitle:self.title];
}
#pragma mark - Public Method 公开方法（头文件声明的方法）
/** 重写导航栏的push方法 */
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    NSInteger sonVC = self.viewControllers.count;
    if (sonVC > 0) {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:animated];
}

#pragma mark - System Delegate Method 系统自带的代理方法
#pragma mark - System DataSource Method 系统自带的数据源方法
#pragma mark - Custom Delegate Method 自定义的代理方法
#pragma mark - Event Response Method 事件响应方法
#pragma mark - Private Method 私有方法
/**
 有返回按钮的导航栏
 
 @param title 导航栏的title
 */
- (void)setNavigationWithTitle:(NSString *)title {
    [self setNavigationBarWithBGColor:kNavigationColor
                                title:title
                           titleColor:[UIColor whiteColor]
                            imageName:@"back"
                              seletor:@selector(popViewController)];
}

/**
 pop回上一个
 */
- (void)popViewController {
    [self.navigationController popViewControllerAnimated:YES];
}
#pragma mark - Getters and Setters Method getter和setter方法

@end
